package com.power.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.PageInfo;
import com.power.model.pojo.Xqrw;
import com.power.service.XqrwService;

@RestController
@RequestMapping("/xq")
public class XqrwController {
@Autowired
XqrwService service;
@RequestMapping("/xqall")
public PageInfo<Xqrw> selectAll(Integer pageNum,Integer pageSize){
	   System.out.println(pageNum+"--"+pageSize);
	 if(pageNum==null)
        pageNum=1;
  if(pageSize==null)
        pageSize=2;
  List<Xqrw> list=  service.selectAll(pageNum,pageSize);
  PageInfo<Xqrw> pager= new PageInfo<Xqrw>(list);
  return pager;
}
}
